-
Notifications
You must be signed in to change notification settings - Fork 0
Color
CHE5YA edited this page Jan 25, 2024
·
3 revisions
Converts a decimal number to its hexadecimal representation.
1.0.0
-
number: The decimal number to convert.
- (string): Returns the hexdecimal representation of the decimal number.
import { ConvertDecimalToHex } from 'makeasy';
ConvertDecimalToHex(10);
// => 0a
ConvertDecimalToHex(255);
// => ffConverts an HSL (Hue, Saturation, Lightness) color value to its corresponding Hexadecimal representation.
1.0.0
-
hue(number): The hue value (0-360). -
saturation(number): The saturation value (0-100). -
lightness(number): The lightness value (0-100).
(string): Returns the Hexadecimal representation of the HSL color.
import ConvertHSLToHex from 'makeasy';
console.log(ConvertHSLToHex(120, 100, 50));
// => "#00ff00"
console.log(ConvertHSLToHex(0, 0, 0));
// => "#000000"
console.log(ConvertHSLToHex(0, 100, 100));
// => "#ffffff"