ColorNames master READ ONLY 0
  • explorer
  • search
a [App]
a CG.ColorNames
a README.md
a app.ts
a [Test]
a test
  • README.md

ColorNames

A simple CG module providing hex, hex string, and RGB values for CSS color names.

Usage

Hex Number

const aliceBlueHex = CG.ColorNames.HexNumColor.aliceblue;
console.log(aliceBlueHex); // 0xf0f8ff

Hex String

const aliceBlueHexStr = CG.ColorNames.HexStrColor.aliceblue;
console.log(aliceBlueHexStr); // "#f0f8ff"

RGB Array

const aliceBlueRgb = CG.ColorNames.RgbColor.aliceblue;
console.log(aliceBlueRgb); // [240, 248, 255]

Examples

Using Hex Number with PIXI.js

sprite.tint = CG.ColorNames.HexNumColor.aliceblue;

Using Hex String for HTML Element

document.body.style.backgroundColor = CG.ColorNames.HexStrColor.aliceblue;

Authors

FOBShippingPoint

READ ONLY
  • problem
  • console
No problems have been detected so far.
Ln 1, Col 1, Sel 0
Markdown