Krita Source Code Documentation
Loading...
Searching...
No Matches
indexcolorpalette.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2014 Manuel Riecke <spell1337@gmail.com>
3 *
4 * SPDX-License-Identifier: ICS
5 */
6
7#ifndef INDEXCOLORPALETTE_H
8#define INDEXCOLORPALETTE_H
9
10#include <QVector>
11#include <QColor>
12#include <QPair>
13#include <KoColor.h>
14
16{
17 quint16 L;
18 quint16 a;
19 quint16 b;
20};
21
23{
25
26 struct
27 {
28 float L;
29 float a;
30 float b;
32
34 void insertShades(QColor clrA, QColor clrB, int shades);
35 void insertShades(KoColor clrA, KoColor clrB, int shades);
36 void insertShades(LabColor clrA, LabColor clrB, int shades);
37
38 void insertColor(QColor clr);
39 void insertColor(KoColor clr);
40 void insertColor(LabColor clr);
41
43
45 int numColors() const;
46 float similarity(LabColor c0, LabColor c1) const;
47 QPair< int, int > getNeighbours(int mainClr) const;
48};
49
50#endif // INDEXCOLORPALETTE_H
float similarity(LabColor c0, LabColor c1) const
LabColor getNearestIndex(LabColor clr) const
void insertColor(QColor clr)
void insertShades(QColor clrA, QColor clrB, int shades)
QVector< LabColor > m_colors
QPair< int, int > getNeighbours(int mainClr) const
struct IndexColorPalette::@11 similarityFactors