Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Simox
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Leander Singer
Simox
Commits
b3727a18
Commit
b3727a18
authored
5 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Add KIT colors
parent
23ea8f7f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SimoxUtility/color/Color.h
+28
-71
28 additions, 71 deletions
SimoxUtility/color/Color.h
SimoxUtility/color/cmaps/colormaps.h
+3
-0
3 additions, 0 deletions
SimoxUtility/color/cmaps/colormaps.h
with
31 additions
and
71 deletions
SimoxUtility/color/Color.h
+
28
−
71
View file @
b3727a18
...
...
@@ -66,97 +66,54 @@ namespace simox::color
// Colorless
static
inline
Color
black
(
int
a
=
255
)
{
return
Color
(
0
,
0
,
0
,
a
);
}
static
inline
Color
white
(
int
a
=
255
)
{
return
Color
(
255
,
255
,
255
,
a
);
}
static
inline
Color
gray
(
int
g
=
128
,
int
a
=
255
)
{
return
Color
(
g
,
g
,
g
,
a
);
}
static
inline
Color
black
(
int
a
=
255
)
{
return
Color
(
0
,
0
,
0
,
a
);
}
static
inline
Color
white
(
int
a
=
255
)
{
return
Color
(
255
,
255
,
255
,
a
);
}
static
inline
Color
gray
(
int
g
=
128
,
int
a
=
255
)
{
return
Color
(
g
,
g
,
g
,
a
);
}
// Primary colors
static
inline
Color
red
(
int
r
=
255
,
int
a
=
255
)
{
return
Color
(
r
,
0
,
0
,
a
);
}
static
inline
Color
green
(
int
g
=
255
,
int
a
=
255
)
{
return
Color
(
0
,
g
,
0
,
a
);
}
static
inline
Color
blue
(
int
b
=
255
,
int
a
=
255
)
{
return
Color
(
0
,
0
,
b
,
a
);
}
static
inline
Color
red
(
int
r
=
255
,
int
a
=
255
)
{
return
Color
(
r
,
0
,
0
,
a
);
}
static
inline
Color
green
(
int
g
=
255
,
int
a
=
255
)
{
return
Color
(
0
,
g
,
0
,
a
);
}
static
inline
Color
blue
(
int
b
=
255
,
int
a
=
255
)
{
return
Color
(
0
,
0
,
b
,
a
);
}
// Secondary colors
/// Green + Blue
static
inline
Color
cyan
(
int
c
=
255
,
int
a
=
255
)
{
return
Color
(
0
,
c
,
c
,
a
);
}
static
inline
Color
cyan
(
int
c
=
255
,
int
a
=
255
)
{
return
Color
(
0
,
c
,
c
,
a
);
}
/// Red + Green
static
inline
Color
yellow
(
int
y
=
255
,
int
a
=
255
)
{
return
Color
(
y
,
y
,
0
,
a
);
}
static
inline
Color
yellow
(
int
y
=
255
,
int
a
=
255
)
{
return
Color
(
y
,
y
,
0
,
a
);
}
/// Red + Blue
static
inline
Color
magenta
(
int
m
=
255
,
int
a
=
255
)
{
return
Color
(
m
,
0
,
m
,
a
);
}
static
inline
Color
magenta
(
int
m
=
255
,
int
a
=
255
)
{
return
Color
(
m
,
0
,
m
,
a
);
}
// 2:1 Mixed colors
/// 2 Red + 1 Green
static
inline
Color
orange
(
int
o
=
255
,
int
a
=
255
)
{
return
Color
(
o
,
o
/
2
,
0
,
a
);
}
static
inline
Color
orange
(
int
o
=
255
,
int
a
=
255
)
{
return
Color
(
o
,
o
/
2
,
0
,
a
);
}
/// 2 Red + 1 Blue
static
inline
Color
pink
(
int
p
=
255
,
int
a
=
255
)
{
return
Color
(
p
,
p
/
2
,
0
,
a
);
}
static
inline
Color
pink
(
int
p
=
255
,
int
a
=
255
)
{
return
Color
(
p
,
p
/
2
,
0
,
a
);
}
/// 2 Green + 1 Red
static
inline
Color
lime
(
int
l
=
255
,
int
a
=
255
)
{
return
Color
(
l
/
2
,
l
,
0
,
a
);
}
static
inline
Color
lime
(
int
l
=
255
,
int
a
=
255
)
{
return
Color
(
l
/
2
,
l
,
0
,
a
);
}
/// 2 Green + 1 Blue
static
inline
Color
turquoise
(
int
t
=
255
,
int
a
=
255
)
{
return
Color
(
0
,
t
,
t
/
2
,
a
);
}
static
inline
Color
turquoise
(
int
t
=
255
,
int
a
=
255
)
{
return
Color
(
0
,
t
,
t
/
2
,
a
);
}
/// 2 Blue + 1 Green
static
inline
Color
azure
(
int
az
=
255
,
int
a
=
255
)
{
return
Color
(
0
,
az
/
2
,
az
,
a
);
}
static
inline
Color
azure
(
int
az
=
255
,
int
a
=
255
)
{
return
Color
(
0
,
az
/
2
,
az
,
a
);
}
/// 2 Blue + 1 Red
static
inline
Color
purple
(
int
p
=
255
,
int
a
=
255
)
{
return
Color
(
0
,
p
/
2
,
p
,
a
);
}
static
inline
Color
purple
(
int
p
=
255
,
int
a
=
255
)
{
return
Color
(
0
,
p
/
2
,
p
,
a
);
}
// KIT colors (source: https://www.sek.kit.edu/downloads/2_Gestaltungsgrundlagen_Farben.pdf)
static
inline
Color
kit_green
(
int
a
=
255
)
{
return
Color
(
0
,
150
,
130
,
a
);
}
static
inline
Color
kit_blue
(
int
a
=
255
)
{
return
Color
(
140
,
182
,
60
,
a
);
}
static
inline
Color
kit_maygreen
(
int
a
=
255
)
{
return
Color
(
140
,
182
,
60
,
a
);
}
static
inline
Color
kit_yellow
(
int
a
=
255
)
{
return
Color
(
252
,
229
,
0
,
a
);
}
static
inline
Color
kit_orange
(
int
a
=
255
)
{
return
Color
(
223
,
155
,
27
,
a
);
}
static
inline
Color
kit_brown
(
int
a
=
255
)
{
return
Color
(
167
,
130
,
46
,
a
);
}
static
inline
Color
kit_red
(
int
a
=
255
)
{
return
Color
(
162
,
34
,
35
,
a
);
}
static
inline
Color
kit_purple
(
int
a
=
255
)
{
return
Color
(
163
,
16
,
124
,
a
);
}
static
inline
Color
kit_cyan
(
int
a
=
255
)
{
return
Color
(
35
,
161
,
224
,
a
);
}
};
...
...
This diff is collapsed.
Click to expand it.
SimoxUtility/color/cmaps/colormaps.h
+
3
−
0
View file @
b3727a18
...
...
@@ -6,6 +6,9 @@
namespace
simox
::
color
::
cmaps
{
// Source: https://matplotlib.org/3.1.0/tutorials/colors/colormaps.html
// Perceptually Uniform Sequential
ColorMap
viridis
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment