From e38637020dba567018b43f9d5e367d8a307f8c4c Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Fri, 25 Oct 2019 19:37:28 +0200 Subject: [PATCH] :art: (Color) add contrast color --- package-lock.json | 5 ++ package.json | 1 + src/components/AccountCard.vue | 10 ++-- src/components/AccountList.vue | 2 +- src/components/TransactionCreate.vue | 4 +- src/data/colors.ts | 17 +++++-- src/models/IColor.ts | 1 + src/shims-vue.d.ts | 1 + src/utils/index.ts | 10 ++++ src/views/accounts/AccountItem.vue | 74 +++++++++++++++++++++------- 10 files changed, 95 insertions(+), 30 deletions(-) diff --git a/package-lock.json b/package-lock.json index 38ddaf0..c3d05dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5958,6 +5958,11 @@ "debug": "=3.1.0" } }, + "font-color-contrast": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/font-color-contrast/-/font-color-contrast-1.0.3.tgz", + "integrity": "sha1-d9iP+Xxr0JXPqd/rRGJLqK1xe2w=" + }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", diff --git a/package.json b/package.json index 5465f84..d18b5a9 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "bulma-pricingtable": "^0.2.0", "bulma-switch": "^2.0.0", "crypto-js": "^3.1.9-1", + "font-color-contrast": "^1.0.3", "lightness": "^1.0.0", "lodash-es": "^4.17.15", "md5": "^2.2.1", diff --git a/src/components/AccountCard.vue b/src/components/AccountCard.vue index ada4602..1b90c8e 100644 --- a/src/components/AccountCard.vue +++ b/src/components/AccountCard.vue @@ -6,7 +6,7 @@ > {{ account.name }} @@ -22,7 +22,7 @@