Discuss Scratch

python_megapixel
Scratcher
500+ posts

RGB to Scratch's nonstandard version of HSL

I am trying to work out what pure red, pure green and pure blue are on Scratch's colour scheme. My first thought was to simply use an RGB (red, green, blue) to HSL (hue, saturation, lightness) converter online, but normally the hues are measured from 0 to 360. But Scratch measures them from 0 to 100.

So, how do I get pure red (255, 0, 0), pure green (0, 255, 0) and pure blue (0, 0, 255) in the Scratch editor?

This used to be a signature, but I deleted it to remove distractions.
Sheep_maker
Scratcher
1000+ posts

RGB to Scratch's nonstandard version of HSL

By the way, you can enter an RGB hexadecimal value directly as a pen colour:
set pen color to (join [0x][F9A83A]) // the one with a colour input

Using their colour picker, the colours should be (0, 100, 100), (33, 100, 100), and (67, 100, 100). The latter two colour values are rounded, so they might not be perfect, but I don't think the human eye would notice

- Sheep_maker This is a kumquat-free signature. :P
This, my signature, appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
NxNmultiply
Scratcher
100+ posts

RGB to Scratch's nonstandard version of HSL

Sheep_maker wrote:

Using their colour picker, the colours should be (0, 100, 100), (33, 100, 100), and (67, 100, 100). The latter two colour values are rounded, so they might not be perfect, but I don't think the human eye would notice
If the color picker is one that has a width divisible by 3 or 6 you might hit a particular pixel where the color is exact.
Sheep_maker
Scratcher
1000+ posts

RGB to Scratch's nonstandard version of HSL

Alternatively, you could make some large pen dots with the desired colours
erase all::pen
set pen size to (160)
set pen color to (join [0x][ff0000])
go to x: (-160) y: (0)
pen down
pen up
set pen color to (join [0x][00ff00])
set x to (0)
pen down
pen up
set pen color to (join [0x][0000ff])
set x to (160)
pen down
pen up
Then save a picture of the stage and upload it as a costume to use the colour picker on.

Also TIL they removed or at least extended the pen size limit. I recall them pondering its purpose during development

- Sheep_maker This is a kumquat-free signature. :P
This, my signature, appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
rdococ
Scratcher
100+ posts

RGB to Scratch's nonstandard version of HSL

Red is at 0 (and also at 100). Green is at the 1/3 point, so that would be 33.3… (or 33)… in Scratch's color picker. Blue is at 2/3, which is 66.6… (or 67).

Yellow is halfway between red and green, so it's at the 1/6 point, which would be 16.6… (or 17). Cyan is halfway between green and blue, so that would be at the 3/6 point, or 50. Magenta is at the 5/6 point, so it would be 83.3… (or 83).

I think they should change it so that the hue goes from 0 to 300. That way, red would be at 0, yellow 50, green 100, cyan 150, blue 200, and magenta 250. Simple and easy to remember.

Powered by DjangoBB

Standard | Mobile