Skip to content

Commit

Permalink
Set the tab loading color
Browse files Browse the repository at this point in the history
The default blue looks bad with some background colors.
  • Loading branch information
dguo committed May 5, 2018
1 parent 2965e67 commit 73c641e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [Unreleased]

## [0.5.0] - 2018-05-04
### Added
- Set the tab loading color because the default blue looks bad with some colors

## [0.4.1] - 2018-04-22
### Fixed
- Apply the theme to new windows
Expand Down Expand Up @@ -42,7 +46,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
### Added
- Initial implementation

[Unreleased]: https://github.com/dguo/picture-paint/compare/v0.4.1...HEAD
[Unreleased]: https://github.com/dguo/picture-paint/compare/v0.5.0...HEAD
[0.5.0]: https://github.com/dguo/picture-paint/compare/v0.4.1...v0.5.0
[0.4.1]: https://github.com/dguo/picture-paint/compare/v0.4.0...v0.4.1
[0.4.0]: https://github.com/dguo/picture-paint/compare/v0.3.0...v0.4.0
[0.3.0]: https://github.com/dguo/picture-paint/compare/v0.2.1...v0.3.0
Expand Down
2 changes: 1 addition & 1 deletion extension/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Picture Paint",
"version": "0.4.1",
"version": "0.5.0",
"author": "Danny Guo",
"homepage_url": "https://github.com/dguo/picture-paint",
"applications": {
Expand Down
12 changes: 8 additions & 4 deletions src/paint.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,24 +65,28 @@ async function setTheme(picture) {
const palette = await iq.buildPalette([pointContainer], {colors: 4});
const points = palette._pointArray;
const firstColor = pointToRgb(points[0]);
const firstColorContrast = fontColorContrast(firstColor);
const secondColor = pointToRgb(points[1]);
const secondColorContrast = fontColorContrast(secondColor);
const thirdColor = pointToRgb(points[2]);
const thirdColorContrast = fontColorContrast(thirdColor);
const fourthColor = pointToRgb(points[3]);

const theme = {
colors: {
accentcolor: firstColor,
popup: thirdColor,
popup_border: fourthColor,
popup_text: fontColorContrast(thirdColor),
popup_text: thirdColorContrast,
tab_line: fourthColor,
textcolor: fontColorContrast(firstColor),
tab_loading: secondColorContrast,
textcolor: firstColorContrast,
toolbar: secondColor,
toolbar_bottom_separator: fourthColor,
toolbar_field: thirdColor,
toolbar_field_border: fourthColor,
toolbar_field_text: fontColorContrast(thirdColor),
toolbar_text: fontColorContrast(secondColor),
toolbar_field_text: thirdColorContrast,
toolbar_text: secondColorContrast,
toolbar_top_separator: fourthColor
}
};
Expand Down

0 comments on commit 73c641e

Please sign in to comment.