diff --git a/share/tools/web_config/js/colorutils.js b/share/tools/web_config/js/colorutils.js index d04b60496..b78b82a7d 100644 --- a/share/tools/web_config/js/colorutils.js +++ b/share/tools/web_config/js/colorutils.js @@ -295,7 +295,7 @@ function adjust_lightness(color_str, func) { /* Given a color, compute a "border color" for it that can show it selected */ function border_color_for_color(color_str) { - return $scope.adjust_lightness(color_str, function(lightness){ + return adjust_lightness(color_str, function(lightness){ var adjust = .5 var new_lightness = lightness + adjust if (new_lightness > 1.0 || new_lightness < 0.0) { @@ -315,7 +315,7 @@ function text_color_for_color(color_str) { } return new_lightness } - return $scope.adjust_lightness(color_str, compute_constrast); + return adjust_lightness(color_str, compute_constrast); } function rgb_to_hsl(r, g, b){ diff --git a/share/tools/web_config/js/controllers.js b/share/tools/web_config/js/controllers.js index 121f2755a..385e4e375 100644 --- a/share/tools/web_config/js/controllers.js +++ b/share/tools/web_config/js/controllers.js @@ -26,6 +26,10 @@ controllers.controller("colorsController", function($scope, $http) { $scope.terminalBackgroundColor = color; } + $scope.text_color_for_color = function(color) { + return text_color_for_color(color); + } + $scope.getColorArraysArray = function() { var result = null; if ( $scope.selectedColorScheme.colors && $scope.selectedColorScheme.colors.length > 0) diff --git a/share/tools/web_config/partials/colors.html b/share/tools/web_config/partials/colors.html index 61757801a..69bf6a479 100644 --- a/share/tools/web_config/partials/colors.html +++ b/share/tools/web_config/partials/colors.html @@ -1,7 +1,8 @@