Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/colors/src/mod.ts>luminance

Color conversion and stuff in TypeScript
Latest
function luminance
Re-export
import { luminance } from "https://deno.land/x/colors@v2.0.2/src/mod.ts";

Calculate luminance from RGB or RGBA color

Parameters

color: Color3 | Color4

An array of RGB or RGBA values.

Returns

number

The luminance of the color.