bring color submodue into repo

This commit is contained in:
Alex Grintsvayg 2021-11-08 09:00:46 -05:00
parent 7944a207c1
commit 1783d80375
No known key found for this signature in database
GPG key ID: AEB3F089F86A22B5
10 changed files with 640 additions and 4 deletions

3
.gitmodules vendored
View file

@ -1,3 +0,0 @@
[submodule "web/scss/color"]
path = web/scss/color
url = https://github.com/lbryio/color

@ -1 +0,0 @@
Subproject commit c959b39b594c410829eb897af97cd6dea9b52d9c

View file

@ -0,0 +1,9 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

2
web/scss/color/.npmrc Normal file
View file

@ -0,0 +1,2 @@
package-lock=false

14
web/scss/color/LICENSE Normal file
View file

@ -0,0 +1,14 @@
BSD 3-Clause License
Copyright © 2018-2020, LBRY Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

48
web/scss/color/README.md Normal file
View file

@ -0,0 +1,48 @@
# @lbry/color
> Color schemes for LBRY properties
### Installation
```bash
$ npm i @lbry/color sass -D
```
We recommend using this module with [Dart Sass](https://www.npmjs.com/package/sass) for its' focus on speed and low dependency count.
### Usage
Your main Sass file:
```scss
@charset "utf-8";
@import "@lbry/color/lbry-color";
// ...your other Sass imports
```
If you want to use CSS variables in your Sass, append `.css` to the import line. So, `@import "@lbry/color/lbry-color.css"`.
In your watch scripts for Sass files, ensure you load the `node_modules` path in order to `import` this module in your project without silly prefixes like `../../../`. What a mess.
Example `package.json` scripts section:
```js
"scripts": {
...,
"sass:dev": "sass --load-path=node_modules --watch app/sass:app/dist --style compressed",
"sass:prod": "sass --load-path=node_modules --update app/sass:app/dist --style compressed",
...
}
```
They are nearly identical, save for `--watch` and `--update`. Please refer to the [Dart Sass README](https://github.com/sass/dart-sass/blob/master/README.md) for assistance on how to integrate it with your project. The [above example](https://github.com/lbryio/lbry.tech/blob/master/package.json) is taken from the `lbry.tech` repo.
### License
[BSD 3-Clause](LICENSE) Copyright © LBRY Inc.

View file

@ -0,0 +1,153 @@
:root {
/* General
* */
--lbry-white: #fff;
--lbry-silver: #f1f3f5;
--lbry-black: #212529;
/* Gray
* */
--lbry-gray-1: #e2e5e9;
--lbry-gray-2: #d8dde1;
--lbry-gray-3: #ced4da;
--lbry-gray-4: #abb1b7;
--lbry-gray-5: #898e93;
/* Teal
* */
--lbry-teal-1: #88e8cb;
--lbry-teal-2: #60e1ba;
--lbry-teal-3: #38d9a9;
--lbry-teal-4: #33b58f;
--lbry-teal-5: #2f9176;
/* Cyan
* */
--lbry-cyan-1: #89dfe9;
--lbry-cyan-2: #62d4e2;
--lbry-cyan-3: #3bc9db;
--lbry-cyan-4: #36a8b7;
--lbry-cyan-5: #318794;
/* Blue
* */
--lbry-blue-1: #85c2f6;
--lbry-blue-2: #5caef3;
--lbry-blue-3: #339af0;
--lbry-blue-4: #2f83c8;
--lbry-blue-5: #2c6ba0;
/* Indigo
* */
--lbry-indigo-1: #acbcfd;
--lbry-indigo-2: #90a5fd;
--lbry-indigo-3: #748ffc;
--lbry-indigo-4: #637ad2;
--lbry-indigo-5: #5365a8;
/* Violet
* */
--lbry-violet-1: #c1acfc;
--lbry-violet-2: #ac91fb;
--lbry-violet-3: #9775fa;
--lbry-violet-4: #7f65d0;
--lbry-violet-5: #6855a6;
/* Grape
* */
--lbry-grape-1: #e9adf7;
--lbry-grape-2: #e192f5;
--lbry-grape-3: #da77f2;
--lbry-grape-4: #b567ca;
--lbry-grape-5: #9056a2;
/* Pink
* */
--lbry-pink-1: #fab5cd;
--lbry-pink-2: #f99cbd;
--lbry-pink-3: #f783ac;
--lbry-pink-4: #cc7092;
--lbry-pink-5: #a15d78;
/* Red
* */
--lbry-red-1: #ec8383;
--lbry-red-2: #e65a5a;
--lbry-red-3: #e03131;
--lbry-red-4: #ba2f2f;
--lbry-red-5: #942c2e;
/* Orange
* */
--lbry-orange-1: #ffbe80;
--lbry-orange-2: #ffa855;
--lbry-orange-3: #ff922b;
--lbry-orange-4: #d37c2b;
--lbry-orange-5: #a6662a;
/* Yellow
* */
--lbry-yellow-1: #ffeca3;
--lbry-yellow-2: #ffe685;
--lbry-yellow-3: #ffe066;
--lbry-yellow-4: #d3bb5a;
--lbry-yellow-5: #a6954e;
/* Lime
* */
--lbry-lime-1: #cbee93;
--lbry-lime-2: #bae96f;
--lbry-lime-3: #a9e34b;
--lbry-lime-4: #8ebd44;
--lbry-lime-5: #73973d;
/* Green
* */
--lbry-green-1: #97e2a3;
--lbry-green-2: #74d985;
--lbry-green-3: #51cf66;
--lbry-green-4: #47ad5a;
--lbry-green-5: #3e8b4e;
}

View file

@ -0,0 +1,96 @@
{
"white": "#fff",
"silver": "#f1f3f5",
"black": "#212529",
"gray": [
"#e2e5e9",
"#d8dde1",
"#ced4da",
"#abb1b7",
"#898e93"
],
"teal": [
"#88e8cb",
"#60e1ba",
"#38d9a9",
"#33b58f",
"#2f9176"
],
"cyan": [
"#89dfe9",
"#62d4e2",
"#3bc9db",
"#36a8b7",
"#318794"
],
"blue": [
"#85c2f6",
"#5caef3",
"#339af0",
"#2f83c8",
"#2c6ba0"
],
"indigo": [
"#acbcfd",
"#90a5fd",
"#748ffc",
"#637ad2",
"#5365a8"
],
"violet": [
"#c1acfc",
"#ac91fb",
"#9775fa",
"#7f65d0",
"#6855a6"
],
"grape": [
"#e9adf7",
"#e192f5",
"#da77f2",
"#b567ca",
"#9056a2"
],
"pink": [
"#fab5cd",
"#f99cbd",
"#f783ac",
"#cc7092",
"#a15d78"
],
"red": [
"#ec8383",
"#e65a5a",
"#e03131",
"#ba2f2f",
"#942c2e"
],
"orange": [
"#ffbe80",
"#ffa855",
"#ff922b",
"#d37c2b",
"#a6662a"
],
"yellow": [
"#ffeca3",
"#ffe685",
"#ffe066",
"#d3bb5a",
"#a6954e"
],
"lime": [
"#cbee93",
"#bae96f",
"#a9e34b",
"#8ebd44",
"#73973d"
],
"green": [
"#97e2a3",
"#74d985",
"#51cf66",
"#47ad5a",
"#3e8b4e"
]
}

View file

@ -0,0 +1,291 @@
// General
//
$lbry-white: #fff;
$lbry-silver: #f1f3f5;
$lbry-black: #212529;
$base-gray: #ced4da;
$base-teal: #38d9a9;
$base-cyan: #3bc9db;
$base-blue: #339af0;
$base-indigo: #748ffc;
$base-violet: #9775fa;
$base-grape: #da77f2;
$base-pink: #f783ac;
$base-red: #e03131;
$base-orange: #ff922b;
$base-yellow: #ffe066;
$base-lime: #a9e34b;
$base-green: #51cf66;
// Gray
//
$lbry-gray-list: (
"1": mix($lbry-white, $base-gray, 40%),
"2": mix($lbry-white, $base-gray, 20%),
"3": $base-gray,
"4": mix($lbry-black, $base-gray, 20%),
"5": mix($lbry-black, $base-gray, 40%)
);
$lbry-gray-1: map-get($lbry-gray-list, "1");
$lbry-gray-2: map-get($lbry-gray-list, "2");
$lbry-gray-3: map-get($lbry-gray-list, "3");
$lbry-gray-4: map-get($lbry-gray-list, "4");
$lbry-gray-5: map-get($lbry-gray-list, "5");
// Teal
//
$lbry-teal-list: (
"1": mix($lbry-white, $base-teal, 40%),
"2": mix($lbry-white, $base-teal, 20%),
"3": $base-teal,
"4": mix($lbry-black, $base-teal, 20%),
"5": mix($lbry-black, $base-teal, 40%)
);
$lbry-teal-1: map-get($lbry-teal-list, "1");
$lbry-teal-2: map-get($lbry-teal-list, "2");
$lbry-teal-3: map-get($lbry-teal-list, "3");
$lbry-teal-4: map-get($lbry-teal-list, "4");
$lbry-teal-5: map-get($lbry-teal-list, "5");
// Cyan
//
$lbry-cyan-list: (
"1": mix($lbry-white, $base-cyan, 40%),
"2": mix($lbry-white, $base-cyan, 20%),
"3": $base-cyan,
"4": mix($lbry-black, $base-cyan, 20%),
"5": mix($lbry-black, $base-cyan, 40%)
);
$lbry-cyan-1: map-get($lbry-cyan-list, "1");
$lbry-cyan-2: map-get($lbry-cyan-list, "2");
$lbry-cyan-3: map-get($lbry-cyan-list, "3");
$lbry-cyan-4: map-get($lbry-cyan-list, "4");
$lbry-cyan-5: map-get($lbry-cyan-list, "5");
// Blue
//
$lbry-blue-list: (
"1": mix($lbry-white, $base-blue, 40%),
"2": mix($lbry-white, $base-blue, 20%),
"3": $base-blue,
"4": mix($lbry-black, $base-blue, 20%),
"5": mix($lbry-black, $base-blue, 40%)
);
$lbry-blue-1: map-get($lbry-blue-list, "1");
$lbry-blue-2: map-get($lbry-blue-list, "2");
$lbry-blue-3: map-get($lbry-blue-list, "3");
$lbry-blue-4: map-get($lbry-blue-list, "4");
$lbry-blue-5: map-get($lbry-blue-list, "5");
// Indigo
//
$lbry-indigo-list: (
"1": mix($lbry-white, $base-indigo, 40%),
"2": mix($lbry-white, $base-indigo, 20%),
"3": $base-indigo,
"4": mix($lbry-black, $base-indigo, 20%),
"5": mix($lbry-black, $base-indigo, 40%)
);
$lbry-indigo-1: map-get($lbry-indigo-list, "1");
$lbry-indigo-2: map-get($lbry-indigo-list, "2");
$lbry-indigo-3: map-get($lbry-indigo-list, "3");
$lbry-indigo-4: map-get($lbry-indigo-list, "4");
$lbry-indigo-5: map-get($lbry-indigo-list, "5");
// Violet
//
$lbry-violet-list: (
"1": mix($lbry-white, $base-violet, 40%),
"2": mix($lbry-white, $base-violet, 20%),
"3": $base-violet,
"4": mix($lbry-black, $base-violet, 20%),
"5": mix($lbry-black, $base-violet, 40%)
);
$lbry-violet-1: map-get($lbry-violet-list, "1");
$lbry-violet-2: map-get($lbry-violet-list, "2");
$lbry-violet-3: map-get($lbry-violet-list, "3");
$lbry-violet-4: map-get($lbry-violet-list, "4");
$lbry-violet-5: map-get($lbry-violet-list, "5");
// Grape
//
$lbry-grape-list: (
"1": mix($lbry-white, $base-grape, 40%),
"2": mix($lbry-white, $base-grape, 20%),
"3": $base-grape,
"4": mix($lbry-black, $base-grape, 20%),
"5": mix($lbry-black, $base-grape, 40%)
);
$lbry-grape-1: map-get($lbry-grape-list, "1");
$lbry-grape-2: map-get($lbry-grape-list, "2");
$lbry-grape-3: map-get($lbry-grape-list, "3");
$lbry-grape-4: map-get($lbry-grape-list, "4");
$lbry-grape-5: map-get($lbry-grape-list, "5");
// Pink
//
$lbry-pink-list: (
"1": mix($lbry-white, $base-pink, 40%),
"2": mix($lbry-white, $base-pink, 20%),
"3": $base-pink,
"4": mix($lbry-black, $base-pink, 20%),
"5": mix($lbry-black, $base-pink, 40%)
);
$lbry-pink-1: map-get($lbry-pink-list, "1");
$lbry-pink-2: map-get($lbry-pink-list, "2");
$lbry-pink-3: map-get($lbry-pink-list, "3");
$lbry-pink-4: map-get($lbry-pink-list, "4");
$lbry-pink-5: map-get($lbry-pink-list, "5");
// Red
//
$lbry-red-list: (
"1": mix($lbry-white, $base-red, 40%),
"2": mix($lbry-white, $base-red, 20%),
"3": $base-red,
"4": mix($lbry-black, $base-red, 20%),
"5": mix($lbry-black, $base-red, 40%)
);
$lbry-red-1: map-get($lbry-red-list, "1");
$lbry-red-2: map-get($lbry-red-list, "2");
$lbry-red-3: map-get($lbry-red-list, "3");
$lbry-red-4: map-get($lbry-red-list, "4");
$lbry-red-5: map-get($lbry-red-list, "5");
// Orange
//
$lbry-orange-list: (
"1": mix($lbry-white, $base-orange, 40%),
"2": mix($lbry-white, $base-orange, 20%),
"3": $base-orange,
"4": mix($lbry-black, $base-orange, 20%),
"5": mix($lbry-black, $base-orange, 40%)
);
$lbry-orange-1: map-get($lbry-orange-list, "1");
$lbry-orange-2: map-get($lbry-orange-list, "2");
$lbry-orange-3: map-get($lbry-orange-list, "3");
$lbry-orange-4: map-get($lbry-orange-list, "4");
$lbry-orange-5: map-get($lbry-orange-list, "5");
// Yellow
//
$lbry-yellow-list: (
"1": mix($lbry-white, $base-yellow, 40%),
"2": mix($lbry-white, $base-yellow, 20%),
"3": $base-yellow,
"4": mix($lbry-black, $base-yellow, 20%),
"5": mix($lbry-black, $base-yellow, 40%)
);
$lbry-yellow-1: map-get($lbry-yellow-list, "1");
$lbry-yellow-2: map-get($lbry-yellow-list, "2");
$lbry-yellow-3: map-get($lbry-yellow-list, "3");
$lbry-yellow-4: map-get($lbry-yellow-list, "4");
$lbry-yellow-5: map-get($lbry-yellow-list, "5");
// Lime
//
$lbry-lime-list: (
"1": mix($lbry-white, $base-lime, 40%),
"2": mix($lbry-white, $base-lime, 20%),
"3": $base-lime,
"4": mix($lbry-black, $base-lime, 20%),
"5": mix($lbry-black, $base-lime, 40%)
);
$lbry-lime-1: map-get($lbry-lime-list, "1");
$lbry-lime-2: map-get($lbry-lime-list, "2");
$lbry-lime-3: map-get($lbry-lime-list, "3");
$lbry-lime-4: map-get($lbry-lime-list, "4");
$lbry-lime-5: map-get($lbry-lime-list, "5");
// Green
//
$lbry-green-list: (
"1": mix($lbry-white, $base-green, 40%),
"2": mix($lbry-white, $base-green, 20%),
"3": $base-green,
"4": mix($lbry-black, $base-green, 20%),
"5": mix($lbry-black, $base-green, 40%)
);
$lbry-green-1: map-get($lbry-green-list, "1");
$lbry-green-2: map-get($lbry-green-list, "2");
$lbry-green-3: map-get($lbry-green-list, "3");
$lbry-green-4: map-get($lbry-green-list, "4");
$lbry-green-5: map-get($lbry-green-list, "5");
// Color list
//
$lbry-color-spectrum: 9;
$lbry-color-list: (
$lbry-gray-list: "gray",
$lbry-teal-list: "teal",
$lbry-cyan-list: "cyan",
$lbry-blue-list: "blue",
$lbry-indigo-list: "indigo",
$lbry-violet-list: "violet",
$lbry-grape-list: "grape",
$lbry-pink-list: "pink",
$lbry-red-list: "red",
$lbry-orange-list: "orange",
$lbry-yellow-list: "yellow",
$lbry-lime-list: "lime",
$lbry-green-list: "green"
);

View file

@ -0,0 +1,27 @@
{
"author": {
"email": "paul+github@lbry.com",
"name": "Paul Anthony Webb"
},
"bugs": {
"url": "https://github.com/lbryio/color/issues"
},
"description": "Color schemes for LBRY properties",
"files": [
"lbry-color.css",
"lbry-color.json",
"lbry-color.scss"
],
"homepage": "https://github.com/lbryio/color",
"license": "BSD 3-Clause",
"main": "lbry-color.json",
"name": "@lbry/color",
"repository": {
"type": "git",
"url": "https://github.com/lbryio/color.git"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"version": "1.1.1"
}