Skip to content

Commit

Permalink
New main version - see readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
NielsHolt committed Dec 16, 2023
1 parent a2240cd commit 5cc5d0d
Showing 21 changed files with 5,512 additions and 1,426 deletions.
37 changes: 31 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -19,10 +19,35 @@ This packages contains JS and SCSS variables defining the different colors and a

To include the variables and functions in a SCSS-file add

@import "../bower-components/fcoo-colors/src/fcoo-colors-mixin";
@import "../bower-components/fcoo-colors/src/fcoo-colors-include";



### chroma.js
Include [chroma.js](https://github.com/gka/chroma.js) to adjust colors


### "Time" colors

Includes scss-variables, css-var, scss-functions and css-classes for colors representing the past, the present (now), and the future.

See `src/fcoo-colors.scss` for details

### FCOO Application Base Color

Includes scss-variables, css-var, scss-functions and css-classes for the basic color for FCOO Web Applications.

By default it is <span style="background-color:#3f5b58; color: white">DALO color in "Forsvarsministeriets koncernfælles Designmanual 2018"</span>

See `src/fcoo-colors.scss` for details

### Methods

window.fcoo.setRootVar(id, value) //Sets :root {--id: value}
window.fcoo.getRootVar(id) //Gets value form :root {id: value}

window.fcoo.color.setApplicationBaseColor(baseColor) //Sets new value for FCOO Application Base Color

## Installation
### bower
`bower install https://github.com/FCOO/fcoo-colors.git --save`
@@ -33,7 +58,7 @@ http://FCOO.github.io/fcoo-colors/demo/
## Usage

###In SCSS-files
@import "../bower-components/fcoo-colors/src/fcoo-colors-mixin";
@import "../bower-components/fcoo-colors/src/fcoo-colors-include";

.color-pink {
background-color: fc-get-color($fc-pink);
@@ -54,10 +79,10 @@ http://FCOO.github.io/fcoo-colors/demo/
window.fcoo.color.defaultOrder // = ["blue", "red", "green", "yellow", "gray", "purple", "pink", "cyan", "orange"];

window.fcoo.color.getColor("blue") //Return "#123456"
window.fcoo.color.getColor(2); //Same as getColor("green")
window.fcoo.color.getColor(2); //Same as getColor("green")

window.fcoo.color.getColorRGB("blue") //Return {red:NUMBER, green:NUMBER, blue:NUMBER, alpha:NUMBER}
window.fcoo.color.getColorRGBArray("blue") //Return [red, green, blue, alpha]
window.fcoo.color.getColorRGB("blue") //Return {red:NUMBER, green:NUMBER, blue:NUMBER, alpha:NUMBER}
window.fcoo.color.getColorRGBArray("blue") //Return [red, green, blue, alpha]


window.fcoo.color.getDeltaColor("blue", 3); //Return "blue" 3 gradiants darker that the default gradiant
@@ -72,7 +97,7 @@ http://FCOO.github.io/fcoo-colors/demo/
## Copyright and License
This plugin is licensed under the [MIT license](https://github.com/FCOO/fcoo-colors/LICENSE).

Copyright (c) 2021 [FCOO](https://github.com/FCOO)
Copyright (c) 2023 [FCOO](https://github.com/FCOO)

## Contact information

13 changes: 10 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
{
"name": "fcoo-colors",
"version": "1.2.0",
"version": "2.0.0",
"homepage": "https://github.com/FCOO/fcoo-colors",
"authors": [
"Niels Holt"
],
"description": "",
"main": "dist/fcoo-colors.js",
"main": [
"dist/fcoo-colors.js",
"dist/fcoo-colors.css"
],
"repository": {
"type": "git",
"url": "git://github.com/FCOO/fcoo-colors.git"
},
"dependencies": {
"jquery": "latest",
"sass-color-helpers": "latest",
"javascript-utilities": "fcoo/javascript-utilities#latest"
"javascript-utilities": "fcoo/javascript-utilities#latest",
"chroma.js": "gka/chroma.js#^2.4.0",
"leaflet-bootstrap-marker-mixin": "fcoo/leaflet-bootstrap-marker-mixin#latest",
"leaflet-polyline-mixin": "fcoo/leaflet-polyline-mixin#latest"
},
"devDependencies": {},
"license": "MIT",
Loading

0 comments on commit 5cc5d0d

Please sign in to comment.