Skip to content

Commit

Permalink
rgb2hex copy to clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
tgomilar committed Sep 17, 2016
1 parent e79c249 commit 7cc2e20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ function initToast(value, rgb2hex) {
var toastColor = $('<div style="width: 48px; height: 48px; border-radius: 50%; margin:auto; background:' + value.result + ';"></div>');
Materialize.toast(toastColor, 10000, 'rounded');
Materialize.toast(toastContent, 10000);
clipboard.copy(hex2rgba);
clipboard.copy(value.result);
$('input#hex').val(value.result).focus();
} else {
var hex2rgb = value.r + ", " + value.g + ", " + value.b;
Expand All @@ -112,7 +112,7 @@ function initToast(value, rgb2hex) {
var toastColor = $('<div style="width: 48px; height: 48px; border-radius: 50%; margin:auto; background:' + hex2rgba + ';"></div>');
Materialize.toast(toastColor, 10000, 'rounded');
Materialize.toast(toastContent, 10000);
clipboard.copy(value.g);
clipboard.copy(hex2rgba);
}
}

Expand Down

0 comments on commit 7cc2e20

Please sign in to comment.