API Documentation
Loading...
Searching...
No Matches
LABColor.h
Go to the documentation of this file.
1/**--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: Base
28File: LABColor
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/Vector.h>
34#include <NDEVR/Buffer.h>
35namespace NDEVR
36{
37 class XYZColor;
38 class ACIColor;
39 class HSBColor;
40 class RGBColor;
41 class String;
42 class TranslatedString;
43 // ----------------------------------------------------------------------------
44 // \brief A Lab color space is a color-opponent space with dimension L for luminance
45 // and a and b for the color-opponent dimensions, based on nonlinearly-compressed CIE XYZ color space coordinates.
46 //
47 // IE L*a*b* color space, also know as CIE 1976 color space, stands for:
48 // L*, the luminance
49 // a*, the red/green color-opponent dimension
50 // b*, the yellow/blue color-opponent dimension
51 // The L*a*b* color model has been created to serve as a device independent
52 // model to be used as a reference. It is based directly on the CIE 1931 XYZ
53 // color space as an attempt to linearize the perceptibility of color differences.
54 // The non-linear relations for L*, a*, and b* are intended to mimic the
55 // logarithmic response of the eye, coloring information is referred to the color
56 // of the white point of the system.
57 //Useful for color comparisions, distances, etc
58 // ----------------------------------------------------------------------------
59 class LABColor : public Vector<4, fltp04>
60 {
61 public:
62 constexpr LABColor()
63 {}
64 constexpr LABColor(fltp04 x, fltp04 y, fltp04 z, fltp04 a = 1.0f)
65 : Vector<4, fltp04>(x, y, z, a)
66 {}
67 constexpr LABColor(const Vector<4, fltp04>& lab)
68 : Vector<4, fltp04>(lab)
69 {}
70 NDEVR_BASE_API explicit LABColor(const XYZColor& lab);
71 NDEVR_BASE_API explicit LABColor(const ACIColor& lab);
72 NDEVR_BASE_API explicit LABColor(const HSBColor& lab);
73 NDEVR_BASE_API explicit LABColor(const RGBColor& lab);
74#if NDEVR_INCLUDE_RAL_COLORS
76 NDEVR_BASE_API const TranslatedString& getName() const;
77#endif
78 };
82}
83
#define NDEVR_BASE_API
Definition DLLInfo.h:78
ACI colors are the standard colors used in AutoCAD-based products. Each color is identified by an ACI...
Definition ACIColor.h:58
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition HSBColor.h:56
Definition LABColor.h:60
constexpr LABColor()
Definition LABColor.h:62
constexpr LABColor(const Vector< 4, fltp04 > &lab)
Definition LABColor.h:67
constexpr LABColor(fltp04 x, fltp04 y, fltp04 z, fltp04 a=1.0f)
Definition LABColor.h:64
Definition MemoryManager.h:283
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:53
Definition TranslatedString.h:9
An element of a vector space. An element of the real coordinate space Rn Basis vector,...
Definition Vector.hpp:62
Definition XYZColor.h:50
Definition ACIColor.h:37
float fltp04
Defines an alias representing a 4 byte floating-point number.
Definition BaseValues.hpp:157
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:120
Definition BaseValues.hpp:272