ScratchData LogoScratchData
Back to 0037318's profile

rgb to hsl

000037318•Created January 13, 2019
rgb to hsl
1
1
64 views
View on Scratch

Instructions

Slide the rgb values, and it will change the pen color and get the hsl value of your color. The hue is displayed on base 360, since most implementations of HSL use that base. Keep in mind that scratch uses base 100 for the hue, so you have to convert using the formula (h/360)*100 (The custom pen color blocks automatically do this for you).

Description

Values now use numbers from 0 to 255, since scratch now supports slider min and max values. You only need the block labeled "decimals" for minimum functionality, as the other blocks use that one as a base.

Project Details

Project ID279283119
CreatedJanuary 13, 2019
Last ModifiedOctober 26, 2020
SharedJanuary 13, 2019
Visibilityvisible
CommentsAllowed