gurki / vivid Goto Github PK
View Code? Open in Web Editor NEWA simple-to-use cpp color library
License: MIT License
A simple-to-use cpp color library
License: MIT License
I wanted to use vivid in my own CMake project under Ubuntu 22.04 LTS
after running
cmake -B build
cmake --build build
cmake --build build --target install
I tried to use vivid in my own CMake C++ project via find_package
. However, CMake can't find vivid.
To me it seems like vivid provides no CMake package config file for find_package
to find it
here in lch lerp (src/interpolation.cpp, line 69)
shouldn't it be 360.f (instead of 380.f)?
thank you.
lch_t lerp( const lch_t& lch1, const lch_t& lch2, const float t )
{
col_t delta = lch2 - lch1;
// move along shortest path (wrap [0; 360])
if ( delta.z > 180.f ) {
delta.z -= 360.f;
} else if ( delta.z < - 180.f ) {
delta.z += 380.f; // <---------- should this be 360?
}
auto interp = lch1 + t * delta;
// project back to [0; 360]
interp.z = std::fmod( interp.z + 360.f, 360.f );
return static_cast<lch_t>( interp );
}
There is a missing -
in one of the Bradford's constants:
vivid/include/vivid/profiles.h
Line 67 in 8ef26cb
Building the project with cmake doesnt work.
I get the following error:
[ 74%] Building CXX object examples/CMakeFiles/vivid_examples_advanced.dir/advanced.cpp.o
In file included from /usr/include/oneapi/tbb/detail/_small_object_pool.h:23,
from /usr/include/oneapi/tbb/detail/_task.h:23,
from /usr/include/oneapi/tbb/parallel_for.h:23,
from /usr/include/tbb/parallel_for.h:17,
from /usr/include/c++/11/pstl/parallel_backend_tbb.h:20,
from /usr/include/c++/11/pstl/parallel_backend.h:20,
from /usr/include/c++/11/pstl/algorithm_impl.h:22,
from /usr/include/c++/11/pstl/glue_execution_defs.h:50,
from /usr/include/c++/11/execution:32,
from /home/aether/Desktop/programs/vivid/examples/advanced.cpp:14:
/usr/include/oneapi/tbb/profiling.h:229:15: error: expected unqualified-id before ‘)’ token
229 | void emit() { }
| ^
/usr/include/oneapi/tbb/profiling.h:231:22: error: expected unqualified-id before ‘const’
231 | static void emit(const std::string &) { }
| ^~~~~
/usr/include/oneapi/tbb/profiling.h:231:22: error: expected ‘)’ before ‘const’
231 | static void emit(const std::string &) { }
| ~^~~~~
| )
gmake[2]: *** [examples/CMakeFiles/vivid_examples_advanced.dir/build.make:76: examples/CMakeFiles/vivid_examples_advanced.dir/advanced.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:268: examples/CMakeFiles/vivid_examples_advanced.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
I am on Ubuntu 22.04
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.