{"id":"bondhemlig/color","name":"color","scope":"bondhemlig","platform":"roblox","description":"Mirrored from the Wally registry.","version":"0.1.0","latest":"0.1.0","versions":["0.1.0"],"license":"MIT","licenseRating":"safe","licenseCaveats":["License identified from the packaged LICENSE file; the manifest declared none."],"licenseVerified":true,"dependencies":{},"integrity":"2e0399e2adb217d299fbb1a5407e038485a0e2d38438e6ec8b6d38cfb2da49a8","likes":0,"downloads":0,"install":"forest install bondhemlig/color","url":"https://forest.dev/p/roblox/bondhemlig/color","files":"https://api.forest.dev/ai/package/roblox/bondhemlig/color/files","readme":"# Color\n\n<a href=\"https://roblox.com/library/7933448750\"><img src=\"https://img.shields.io/badge/roblox-model-green.svg\" alt=\"Install\" /></a>\n<a href=\"https://blupo.github.io/Color\"><img src=\"https://img.shields.io/badge/docs-website-green.svg\" alt=\"Documentation\" /></a>\n\nColor is a Roblox Luau library for color management and manipulation, inspired by [chroma.js](https://vis4.net/chromajs/).\n\n## Installing\n\nThe module is available in the library [here](https://roblox.com/library/7933448750) if you want to install it using the Toolbox. You can also grab a [release](https://github.com/Blupo/Color/releases) from GitHub and install it manually.\n\nIf you know how to use [Rojo](https://rojo.space), you can build the latest code from the development branch to get the newest features. Keep in mind that this is **development code**, and things can break or change quickly.\n\n## Features\n\nSome of the library's features includes:\n\n- Reading colors from many different formats\n- Converting colors to many different formats\n- Color interpolation in different spaces\n- Creating gradients\n\nFor a full introduction to the library, you can read the [documentation](https://blupo.github.io/Color). Some example code of the library's features is included below:\n\n```lua\n-- Accessing the modules\nlocal ColorLib = require(...)\n\nlocal Color = ColorLib.Color\nlocal Gradient = ColorLib.Gradient\n\n-- Constructors\nlocal pink = Color.fromHex(\"#ff69b4\")\nlocal blue = Color.from(\"HSB\", 240, 1, 1)\nlocal yellow = Color.fromLab(0.97139, -0.21554, 0.94478)\n\nlocal newYeller = Color.fromBrickColor(BrickColor.new(\"New Yeller\"))\nlocal white = Color.new(1, 1, 1) -- or Color.gray(1)\n\nlocal hotpink = Color.named(\"hotpink\")\n\n-- Conversions\nprint(blue:toHex()) --> \"0000ff\"\nprint(blue:toHSB()) --> 240, 1, 1\nprint(blue:to(\"Lab\")) --> 0.32297, 0.79188, -1.07860\nprint(blue:components()) --> 0, 0, 1\n\n-- Interpolation\nlocal red = Color.named(\"red\")\nlocal aqua = Color.named(\"aqua\")\n\nred:mix(aqua, 0.5)\nred:mix(aqua, 0.5, \"XYZ\")\nred:mix(aqua, 0.5, \"Lab\")\nred:mix(aqua, 0.5, \"Luv\")\n\n-- Gradients\nlocal gradient = Gradient.fromColors(\n    Color.named(\"red\"),\n    Color.named(\"green\"),\n    Color.named(\"blue\")\n)\n\nprint(gradient:color(0.6, \"XYZ\"):toHex()) --> \"00737c\"\nprint(gradient:color(0.6, \"HSB\", \"Increasing\"):to(\"Hex\")) --> \"00993d\"\n\ngradient:colors(50, \"XYZ\")\ngradient:colorSequence(nil, \"XYZ\")\n```","readmeTruncated":false}