/* * Copyright (C) 2023 Christopher J. Howard * * This file is part of Antkeeper source code. * * Antkeeper source code is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Antkeeper source code is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Antkeeper source code. If not, see . */ #ifndef ANTKEEPER_COLOR_ILLUMINANT_HPP #define ANTKEEPER_COLOR_ILLUMINANT_HPP #include "math/vector.hpp" namespace color { /** * CIE standard illuminants. * * @see https://en.wikipedia.org/wiki/Standard_illuminant */ namespace illuminant { /// CIE 1931 2 Degree Standard Observer illuminants. namespace deg2 { template constexpr math::vector2 a = {T{0.44757}, T{0.40745}}; template constexpr math::vector2 b = {T{0.34842}, T{0.35161}}; template constexpr math::vector2 c = {T{0.31006}, T{0.31616}}; template constexpr math::vector2 d50 = {T{0.34567}, T{0.35850}}; template constexpr math::vector2 d55 = {T{0.33242}, T{0.34743}}; template constexpr math::vector2 d65 = {T{0.31271}, T{0.32902}}; template constexpr math::vector2 d75 = {T{0.29902}, T{0.31485}}; template constexpr math::vector2 d93 = {T{0.28315}, T{0.29711}}; template constexpr math::vector2 e = {T{0.33333}, T{0.33333}}; template constexpr math::vector2 f1 = {T{0.31310}, T{0.33727}}; template constexpr math::vector2 f2 = {T{0.37208}, T{0.37529}}; template constexpr math::vector2 f3 = {T{0.40910}, T{0.39430}}; template constexpr math::vector2 f4 = {T{0.44018}, T{0.40329}}; template constexpr math::vector2 f5 = {T{0.31379}, T{0.34531}}; template constexpr math::vector2 f6 = {T{0.37790}, T{0.38835}}; template constexpr math::vector2 f7 = {T{0.31292}, T{0.32933}}; template constexpr math::vector2 f8 = {T{0.34588}, T{0.35875}}; template constexpr math::vector2 f9 = {T{0.37417}, T{0.37281}}; template constexpr math::vector2 f10 = {T{0.34609}, T{0.35986}}; template constexpr math::vector2 f11 = {T{0.38052}, T{0.37713}}; template constexpr math::vector2 f12 = {T{0.43695}, T{0.40441}}; template constexpr math::vector2 led_b1 = {T{0.4560}, T{0.4078}}; template constexpr math::vector2 led_b2 = {T{0.4357}, T{0.4012}}; template constexpr math::vector2 led_b3 = {T{0.3756}, T{0.3723}}; template constexpr math::vector2 led_b4 = {T{0.3422}, T{0.3502}}; template constexpr math::vector2 led_b5 = {T{0.3118}, T{0.3236}}; template constexpr math::vector2 led_bh1 = {T{0.4474}, T{0.4066}}; template constexpr math::vector2 led_rgb1 = {T{0.4557}, T{0.4211}}; template constexpr math::vector2 led_v1 = {T{0.4560}, T{0.4548}}; template constexpr math::vector2 led_v2 = {T{0.3781}, T{0.3775}}; } // deg2 /// CIE 1964 10 Degree Standard Observer illuminants. namespace deg10 { template constexpr math::vector2 a = {T{0.45117}, T{0.40594}}; template constexpr math::vector2 b = {T{0.34980}, T{0.35270}}; template constexpr math::vector2 c = {T{0.31039}, T{0.31905}}; template constexpr math::vector2 d50 = {T{0.34773}, T{0.35952}}; template constexpr math::vector2 d55 = {T{0.33411}, T{0.34877}}; template constexpr math::vector2 d65 = {T{0.31382}, T{0.33100}}; template constexpr math::vector2 d75 = {T{0.29968}, T{0.31740}}; template constexpr math::vector2 d93 = {T{0.28327}, T{0.30043}}; template constexpr math::vector2 e = {T{0.33333}, T{0.33333}}; template constexpr math::vector2 f1 = {T{0.31811}, T{0.33559}}; template constexpr math::vector2 f2 = {T{0.37925}, T{0.36733}}; template constexpr math::vector2 f3 = {T{0.41761}, T{0.38324}}; template constexpr math::vector2 f4 = {T{0.44920}, T{0.39074}}; template constexpr math::vector2 f5 = {T{0.31975}, T{0.34246}}; template constexpr math::vector2 f6 = {T{0.38660}, T{0.37847}}; template constexpr math::vector2 f7 = {T{0.31569}, T{0.32960}}; template constexpr math::vector2 f8 = {T{0.34902}, T{0.35939}}; template constexpr math::vector2 f9 = {T{0.37829}, T{0.37045}}; template constexpr math::vector2 f10 = {T{0.35090}, T{0.35444}}; template constexpr math::vector2 f11 = {T{0.38541}, T{0.37123}}; template constexpr math::vector2 f12 = {T{0.44256}, T{0.39717}}; } // namespace deg10 } // namespace illuminant } // namespace color #endif // ANTKEEPER_COLOR_ILLUMINANT_HPP