Cleanup, rebuild CI, add lighter version color util for later

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2024-01-06 15:51:20 +01:00
parent 43bf3abe0e
commit 6505acaa75
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
4 changed files with 13 additions and 28 deletions

View file

@ -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
{