Skip to main content

Oklab

A different color space that looks more uniform to the human eye.

See: https://bottosson.github.io/posts/oklab/

Functions

ToOklab

Oklab.ToOklab(
RobloxColorColor3--

Color represented in RGB space

) → Vector3--

Oklab color value in the format (L, a, b)

Converts a Color3 in RGB space to a Vector3 in Oklab space.

FromOklab

Oklab.FromOklab(
OklabColorVector3,--

Oklab color value in the format (L, a, b)

ReturnUnclampedboolean?--

If true, allows channel values outside [0, 1]

) → Color3--

Color represented in RGB space

Converts a Vector3 in Oklab space to a Color3 in RGB space.

By default, output channels are clamped to [0, 1].

Show raw api
{
    "functions": [
        {
            "name": "ToOklab",
            "desc": "Converts a Color3 in RGB space to a Vector3 in Oklab space.",
            "params": [
                {
                    "name": "RobloxColor",
                    "desc": "Color represented in RGB space",
                    "lua_type": "Color3"
                }
            ],
            "returns": [
                {
                    "desc": "Oklab color value in the format (L, a, b)",
                    "lua_type": "Vector3"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 19,
                "path": "src/Packages/Oklab/init.luau"
            }
        },
        {
            "name": "FromOklab",
            "desc": "Converts a Vector3 in Oklab space to a Color3 in RGB space.\n\nBy default, output channels are clamped to [0, 1].",
            "params": [
                {
                    "name": "OklabColor",
                    "desc": "Oklab color value in the format (L, a, b)",
                    "lua_type": "Vector3"
                },
                {
                    "name": "ReturnUnclamped",
                    "desc": "If true, allows channel values outside [0, 1]",
                    "lua_type": "boolean?"
                }
            ],
            "returns": [
                {
                    "desc": "Color represented in RGB space",
                    "lua_type": "Color3"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 45,
                "path": "src/Packages/Oklab/init.luau"
            }
        }
    ],
    "properties": [],
    "types": [],
    "name": "Oklab",
    "desc": "A different color space that looks more uniform to the human eye.\n\nSee: https://bottosson.github.io/posts/oklab/",
    "source": {
        "line": 10,
        "path": "src/Packages/Oklab/init.luau"
    }
}