Skip to content

oklab: Matrices have been updated #52

Description

@SamGG

The conversion functions do not use the updated values reported at https://bottosson.github.io/posts/oklab/#converting-from-linear-srgb-to-oklab, but the previous version https://bottosson.github.io/misc/srgb_to_oklab_old.txt.

There is no impact on the color displayed on a sRGB screen, but for a numerical comparison it is not equal.

Best.

farver/src/Conversion.cpp

Lines 582 to 584 in aa5b136

double l = 0.4121656120 * r + 0.5362752080 * g + 0.0514575653 * b;
double m = 0.2118591070 * r + 0.6807189584 * g + 0.1074065790 * b;
double s = 0.0883097947 * r + 0.2818474174 * g + 0.6302613616 * b;

farver/src/Conversion.cpp

Lines 609 to 611 in aa5b136

double r = 4.0767245293 * l - 3.3072168827 * m + 0.2307590544 * s;
double g = -1.2681437731 * l + 2.6093323231 * m - 0.3411344290 * s;
double b = -0.0041119885 * l - 0.7034763098 * m + 1.7068625689 * s;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions