Show raw api
{
"functions": [
{
"name": "getRelativeLuminance",
"desc": "Luminance as per W3 per sRGB colorspace normalized with 0\nas the darkest dark, and 1 as the whitest white.\n\nSee https://www.w3.org/TR/WCAG20/#relativeluminancedef",
"params": [
{
"name": "color",
"desc": "The Color3 to check",
"lua_type": "Color3"
}
],
"returns": [
{
"desc": "A scalar from 0 to 1 with 0 as the darkest dark, and 1 as the whitest white",
"lua_type": "number"
}
],
"function_type": "static",
"source": {
"line": 18,
"path": "src/color3utils/src/Shared/Color3Utils.lua"
}
},
{
"name": "textShouldBeBlack",
"desc": "Returns whether or not the text should be black using\nrelative luminance as a metric.\n\nSee https://stackoverflow.com/questions/3942878/",
"params": [
{
"name": "color",
"desc": "The Color3 to check",
"lua_type": "Color3"
}
],
"returns": [
{
"desc": "True if the text should be black, false if it should be good",
"lua_type": "boolean"
}
],
"function_type": "static",
"source": {
"line": 41,
"path": "src/color3utils/src/Shared/Color3Utils.lua"
}
},
{
"name": "scaleValue",
"desc": "Scales the value component of hsv",
"params": [
{
"name": "color3",
"desc": "",
"lua_type": "Color3"
},
{
"name": "percent",
"desc": "Percent scaling",
"lua_type": "number"
}
],
"returns": [
{
"desc": "",
"lua_type": "Color3"
}
],
"function_type": "static",
"source": {
"line": 51,
"path": "src/color3utils/src/Shared/Color3Utils.lua"
}
},
{
"name": "setValue",
"desc": "Sets the value component of hsv",
"params": [
{
"name": "color3",
"desc": "",
"lua_type": "Color3"
},
{
"name": "value",
"desc": "",
"lua_type": "number"
}
],
"returns": [
{
"desc": "",
"lua_type": "Color3"
}
],
"function_type": "static",
"source": {
"line": 62,
"path": "src/color3utils/src/Shared/Color3Utils.lua"
}
},
{
"name": "setHue",
"desc": "Sets the hue component of hsv",
"params": [
{
"name": "color3",
"desc": "",
"lua_type": "Color3"
},
{
"name": "hue",
"desc": "",
"lua_type": "number"
}
],
"returns": [
{
"desc": "",
"lua_type": "Color3"
}
],
"function_type": "static",
"source": {
"line": 73,
"path": "src/color3utils/src/Shared/Color3Utils.lua"
}
},
{
"name": "scaleSaturation",
"desc": "Scales the saturation component of hsv",
"params": [
{
"name": "color3",
"desc": "",
"lua_type": "Color3"
},
{
"name": "percent",
"desc": "Percent scaling",
"lua_type": "number"
}
],
"returns": [
{
"desc": "",
"lua_type": "Color3"
}
],
"function_type": "static",
"source": {
"line": 84,
"path": "src/color3utils/src/Shared/Color3Utils.lua"
}
},
{
"name": "setSaturation",
"desc": "Sets the saturation component of hsv",
"params": [
{
"name": "color3",
"desc": "",
"lua_type": "Color3"
},
{
"name": "saturation",
"desc": "",
"lua_type": "number"
}
],
"returns": [
{
"desc": "",
"lua_type": "Color3"
}
],
"function_type": "static",
"source": {
"line": 95,
"path": "src/color3utils/src/Shared/Color3Utils.lua"
}
},
{
"name": "areEqual",
"desc": "Compares 2 color3 values",
"params": [
{
"name": "a",
"desc": "",
"lua_type": "Color3"
},
{
"name": "b",
"desc": "",
"lua_type": "Color3"
},
{
"name": "epsilon",
"desc": "Optional",
"lua_type": "number?"
}
],
"returns": [
{
"desc": "",
"lua_type": "boolean"
}
],
"function_type": "static",
"source": {
"line": 108,
"path": "src/color3utils/src/Shared/Color3Utils.lua"
}
},
{
"name": "toHexInteger",
"desc": "Converts the color3 to the actual hex integer used in web and other\nareas.",
"params": [
{
"name": "color3",
"desc": "",
"lua_type": "Color3"
}
],
"returns": [
{
"desc": "",
"lua_type": "number"
}
],
"function_type": "static",
"source": {
"line": 125,
"path": "src/color3utils/src/Shared/Color3Utils.lua"
}
},
{
"name": "toHexString",
"desc": "Converts the color3 to the actual hex integer used in web and other\nareas.\n\n```\nColor3Utils.toHexString(Color3.fromRGB(0, 255, 0)) --> 00FF00\n```",
"params": [
{
"name": "color3",
"desc": "",
"lua_type": "Color3"
}
],
"returns": [
{
"desc": "",
"lua_type": "number"
}
],
"function_type": "static",
"source": {
"line": 142,
"path": "src/color3utils/src/Shared/Color3Utils.lua"
}
},
{
"name": "toWebHexString",
"desc": "Converts the color3 to the standard web hex string\n\n```\nColor3Utils.toWebHexString(Color3.fromRGB(0, 255, 0)) --> #00FF00\n```",
"params": [
{
"name": "color3",
"desc": "",
"lua_type": "Color3"
}
],
"returns": [
{
"desc": "",
"lua_type": "number"
}
],
"function_type": "static",
"source": {
"line": 158,
"path": "src/color3utils/src/Shared/Color3Utils.lua"
}
}
],
"properties": [],
"types": [],
"name": "Color3Utils",
"desc": "Utility methods for Roblox Color3 values",
"source": {
"line": 5,
"path": "src/color3utils/src/Shared/Color3Utils.lua"
}
}