Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
gepetto-viewer-corba
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gepetto
gepetto-viewer-corba
Commits
500cd962
Commit
500cd962
authored
8 years ago
by
Joseph Mirabel
Committed by
Joseph Mirabel
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add missing file color.py
parent
44570293
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/gepetto/color.py
+61
-0
61 additions, 0 deletions
src/gepetto/color.py
with
61 additions
and
0 deletions
src/gepetto/color.py
0 → 100644
+
61
−
0
View file @
500cd962
#!/usr/bin/env python
# Copyright (c) 2014 CNRS
# Author: Joseph Mirabel
#
# This file is part of gepetto-viewer-corba.
# gepetto-viewer-corba is free software: you can redistribute it
# and/or modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, either version
# 3 of the License, or (at your option) any later version.
#
# gepetto-viewer-corba 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 Lesser Public License for more details. You should have
# received a copy of the GNU Lesser General Public License along with
# gepetto-viewer-corba. If not, see
# <http://www.gnu.org/licenses/>.
## Helper class
class
Color
(
object
):
# Define some RGBA-normalized color (osg convention)
white
=
[
1.0
,
1.0
,
1.0
,
1.0
]
lightWhite
=
[
1.0
,
1.0
,
1.0
,
0.5
]
green
=
[
0
,
1
,
0
,
1
]
lightGreen
=
[
0
,
1
,
0
,
0.5
]
yellow
=
[
1
,
1
,
0
,
1
]
lightYellow
=
[
1
,
1
,
0
,
0.5
]
blue
=
[
0.0
,
0.0
,
1
,
1.0
]
lightBlue
=
[
0.0
,
0.0
,
1
,
0.5
]
grey
=
[
0.7
,
0.7
,
0.7
,
1.0
]
lightGrey
=
[
0.7
,
0.7
,
0.7
,
0.7
]
red
=
[
1
,
0.0
,
0.0
,
1.0
]
lightRed
=
[
1
,
0.0
,
0.0
,
0.5
]
black
=
[
0
,
0
,
0
,
1.0
]
lightBlack
=
[
0
,
0
,
0
,
0.5
]
brown
=
[
0.85
,
0.75
,
0.15
,
1.0
]
lightBrown
=
[
0.85
,
0.75
,
0.15
,
1.0
]
def
__init__
(
self
):
self
.
colors
=
(
self
.
white
,
self
.
lightWhite
,
self
.
green
,
self
.
lightGreen
,
self
.
yellow
,
self
.
lightYellow
,
self
.
blue
,
self
.
lightBlue
,
self
.
grey
,
self
.
lightGrey
,
self
.
red
,
self
.
lightRed
,
self
.
black
,
self
.
lightBlack
,
self
.
brown
,
self
.
lightBrown
,
)
def
__getitem__
(
self
,
i
):
return
self
.
colors
[
i
]
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