Skip to content

KBE3D / KBCore / Cesium / srgbToLinear

函数: srgbToLinear()

srgbToLinear(value: number): number

Converts the value from sRGB color space to linear color space.

参数

value

number

The color value in sRGB color space.

返回

number

Returns the color value in linear color space.

示例

ts
const srgbColor = [0.5, 0.5, 0.5];
const linearColor = srgbColor.map(function (c) {
    return Cesium.srgbToLinear(c);
});

KBE3D @3.0.0 Copyright © 2024-present KBE3D