/roblox-brick-color

Brick color hurts, doesn't it? This package should ease the pain associated with brick colors. No prescription required.

Primary LanguageTypeScriptMIT LicenseMIT

@daw588/roblox-brick-color


Brick color hurts, doesn't it? This package should ease the pain associated with brick colors. No prescription required.

Getting Started

Install the package through the package manager of your choice. For this example, I chose NPM.

npm install @daw588/roblox-brick-color

Then just import the package and you're all set.

import { BrickColor } from "@daw588/roblox-brick-color";

BrickColor.fromID(1); // BrickColor
BrickColor.fromName("White"); // BrickColor
BrickColor.fromRGB({ r: 243, g: 243, b: 243 }); // BrickColor

const whiteBrick = BrickColor.fromID(1); // BrickColor

whiteBrick.toID(); // 1
whiteBrick.toName(); // "White"
whiteBrick.toRGB(); // { r: 243, g: 243, b: 243 }

Compatibility

This package has no dependencies, and it will work in any JavaScript environment as long as it supports ES6 module syntax. Types are included, and TypeScript is not required.