Archicad 29 C++ API
|
Starting with Archicad 29, the APIDevKit provides automatic dark mode icon generation, available exclusively on the Mac platform. This feature processes SVG files to create dark mode variants, but only if colors are specified in the #xxxxxx
or #xxx
hexadecimal format. Icons using color literals are not supported.
During the build process, a color check is performed for all SVG files. This check ensures that every color in the SVG has a corresponding dark mode color defined in the configuration file. If any color is missing a counterpart, the build will fail with an error.
The configuration file, SVG_ColorChange_Darkmode.json
under Support/Tools/OSX/ folder, manages the color conversion under the colorTable
key. By default, it contains Graphisoft colors and their dark mode equivalents, but you can extend it with your own custom color pairs. The file also allows you to exclude specific files (excludeFiles
key) or folders (excludeFolders
key) from processing, so those SVGs remain unchanged in dark mode.
Additionally, you can specify noCheckFiles
and noCheckFolders
. For these, dark mode icons will be generated, but the color check will be skipped.
See the example below:
In this configuration:
cursor.svg
will be excluded from processing entirely. No dark mode icon will be generated for these files.icon.svg
will have dark mode icons generated, but the color check will be skipped for them.Assets
folder (for example, /Volumes/Mac HD/MyProject/Assets/file.svg
), it will be excluded from processing, so no dark mode icon will be generated for any file within any Assets
folder.Customs
folder, all SVGs in that folder will be converted to dark mode icons, but the color check will be skipped for them.This allows for flexible control over which icons are processed and how, based on file names and folder paths.