Cleanup, rebuild CI, add lighter version color util for later
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
43bf3abe0e
commit
6505acaa75
4 changed files with 13 additions and 28 deletions
|
@ -1,18 +1,7 @@
|
|||
/*
|
||||
* DISTRHO Cardinal Plugin
|
||||
* Copyright (C) 2021-2022 Filipe Coelho <falktx@falktx.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 3 of
|
||||
* the License, or any later version.
|
||||
*
|
||||
* This program 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 Public License for more details.
|
||||
*
|
||||
* For a full copy of the GNU General Public License see the LICENSE file.
|
||||
* Copyright (C) 2021-2024 Filipe Coelho <falktx@falktx.com>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#define STDIO_OVERRIDE Rackdep
|
||||
|
@ -650,6 +639,15 @@ unsigned int darkerColor(const unsigned int color) noexcept
|
|||
| (std::max<int>(0, (color & 0xff) - 0x80));
|
||||
}
|
||||
|
||||
static inline
|
||||
unsigned int lighterColor(const unsigned int color) noexcept
|
||||
{
|
||||
return (color & 0xff000000)
|
||||
| (std::min<int>(0xff, ((color & 0xff0000) >> 16) + 0x80) << 16)
|
||||
| (std::min<int>(0xff, ((color & 0xff00) >> 8) + 0x80) << 8)
|
||||
| (std::min<int>(0xff, (color & 0xff) + 0x80));
|
||||
}
|
||||
|
||||
static inline
|
||||
unsigned int invertColor(const unsigned int color) noexcept
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue