QXmpp: hsluv.h Source File

QXmpp Version: 1.14.4

Loading...
Searching...
No Matches
hsluv.h
1// SPDX-FileCopyrightText: 2015 Alexei Boronine (original idea, JavaScript implementation)
2// SPDX-FileCopyrightText: 2015 Roger Tallada (Obj-C implementation)
3// SPDX-FileCopyrightText: 2017 Martin Mitas (C implementation, based on Obj-C implementation)
4//
5// SPDX-License-Identifier: MIT
6
7/*
8 * HSLuv-C: Human-friendly HSL
9 * <https://github.com/hsluv/hsluv-c>
10 * <https://www.hsluv.org/>
11 *
12 * Copyright (c) 2015 Alexei Boronine (original idea, JavaScript implementation)
13 * Copyright (c) 2015 Roger Tallada (Obj-C implementation)
14 * Copyright (c) 2017 Martin Mitáš (C implementation, based on Obj-C implementation)
15 *
16 * Permission is hereby granted, free of charge, to any person obtaining a
17 * copy of this software and associated documentation files (the "Software"),
18 * to deal in the Software without restriction, including without limitation
19 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
20 * and/or sell copies of the Software, and to permit persons to whom the
21 * Software is furnished to do so, subject to the following conditions:
22 *
23 * The above copyright notice and this permission notice shall be included in
24 * all copies or substantial portions of the Software.
25 *
26 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
27 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
31 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
32 * IN THE SOFTWARE.
33 */
34
35#ifndef HSLUV_H
36#define HSLUV_H
37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
52void hsluv2rgb(double h, double s, double l, double *pr, double *pg, double *pb);
53
64void rgb2hsluv(double r, double g, double b, double *ph, double *ps, double *pl);
65
76void hpluv2rgb(double h, double s, double l, double *pr, double *pg, double *pb);
77
111int rgb2hpluv(double r, double g, double b, double *ph, double *ps, double *pl);
112
113#ifdef __cplusplus
114}
115#endif
116
117#endif /* HSLUV_H */