aboutsummaryrefslogtreecommitdiffstats
path: root/apps/theming/lib/util.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/theming/lib/util.php')
-rw-r--r--apps/theming/lib/util.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/theming/lib/util.php b/apps/theming/lib/util.php
index e83d854b997..f0ce30ac5ba 100644
--- a/apps/theming/lib/util.php
+++ b/apps/theming/lib/util.php
@@ -71,4 +71,14 @@ class Util {
return (0.299 * $r + 0.587 * $g + 0.114 * $b)/255;
}
+ /**
+ * @param $color
+ * @return string base64 encoded radio button svg
+ */
+ public static function generateRadioButton($color) {
+ $radioButtonIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">' .
+ '<path d="M8 1a7 7 0 0 0-7 7 7 7 0 0 0 7 7 7 7 0 0 0 7-7 7 7 0 0 0-7-7zm0 1a6 6 0 0 1 6 6 6 6 0 0 1-6 6 6 6 0 0 1-6-6 6 6 0 0 1 6-6zm0 2a4 4 0 1 0 0 8 4 4 0 0 0 0-8z" fill="'.$color.'"/></svg>';
+ return base64_encode($radioButtonIcon);
+ }
+
}