hex colors

Skip to first unread message

Terrel Shumway

Jan 31, 2023, 3:50:31 AMJan 31
to Pyret Discuss

I was surprised that there isn't a standard way to use RGB hex codes as color names. I was equally surprised to find that string-to-number doesn't handle hex digits.

So I wrote the functions that I thought were missing.

I'm not sure how to best handle invalid digits—maybe return Option<Number>?

Is this worth adding to Pyret or Racket?
Reply all
Reply to author
0 new messages