Skip to main content
Module

x/colormath/mod.ts>gray.toRgb

A color conversion and color manipulation library written in typescript for Node.js, Deno and Browser 🎨.
Latest
function gray.toRgb
import { gray } from "https://deno.land/x/colormath@1.2.4/mod.ts";
const { toRgb } = gray;

Converts grayscale percentage to rgb values in the form of [r, g, b] array.

Examples

gray.toRgb(100); // [255, 255, 255]

Parameters

gray: number

The grayscale percentage

Returns

number[]