First-class colors (Part 1)

you can convert RGB to HSL/HSL to RGB. summing colors would be easy with some basic math. you can just sum 2 R(or G or B) values and cap it to 255. or map it 510 (not sure which one to use).
summing %s is almost same thing. but calculate with % values.

(if values are between 0 and 1. no difference in math tbh)


I find colors a lot visually easier to deal with than lists.


Jens reminds me that if you make a one-pixel costume with the color you want, it displays in speech balloons just like a color -- a square filled with the color in question. I'm now working on using that to extend the Colors and Crayons library for first class colors.

oh right, I forgot about that!

What, how do I do that?

It's easy:

I'm working on a project now to utilize this and implement workaround first-class colors.

lol, I am doing the same thing :open_mouth:

I made a prototype:
@sathvikrias what other blocks do you need?
The mix colors block doesn't really work very well but the rest of it does.
Edit: Oh, I just made a minor mistake that's easily fixed. Never mind. The mix colors block s working now.

cool!, I'll share my prototype when I am done.

Just a quick question, How to convert a number to hexadecimal and the other way again?
@helicoptur (Put username here to call you)

Beats me. I know that @hm100's CPE Blocks has a few blocks that can do that.

Here is my improved version of the first-class-colors project :

no it's not,

that should be green.

uh oh.

yeah. I can't figure out why.

Can you give me the script?

huh? that block is the one in helicoptur's project