diff --git a/src/svg/svg-color.cpp b/src/svg/svg-color.cpp
index db2a891509ec282a5d6fef7567bd0e298f3f4f3a..57003064ace036aeeefd0d0ae26c0da0cebafd9b 100644 (file)
--- a/src/svg/svg-color.cpp
+++ b/src/svg/svg-color.cpp
# include "config.h"
#endif
+#include "prefs-utils.h"
#include "svg-color.h"
#include "svg-icc-color.h"
#include <cassert>
strcpy(buf, src);
}
- assert(sp_svg_read_color(buf, 0xff) == (rgb24 << 8));
+ // assert(sp_svg_read_color(buf, 0xff) == (rgb24 << 8));
}
/**
g_assert(8 <= buflen);
unsigned const rgb24 = rgba32 >> 8;
- rgb24_to_css(buf, rgb24);
+ if (prefs_get_int_attribute("options.svgoutput", "usenamedcolors", 0)) {
+ rgb24_to_css(buf, rgb24);
+ } else {
+ g_snprintf(buf, buflen, "#%06x", rgb24);
+ }
}
static GHashTable *