Comments (4)
It took a while but It should work now!
(the mutate() part of it was fixed when I looked at it just now so it might have been fixed in dplyr, but rowwise() was still broken, which is fixed now)
library(prismatic)
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
x <- c("#fbbcb8", "#bfdff6")
clr_darken(x)
#> <colors>
#> #CE170CFF #1B7BC0FF
tibble(color = x) %>%
mutate(darker = clr_darken(color))
#> # A tibble: 2 x 2
#> color darker
#> <chr> <colors>
#> 1 #fbbcb8 #CE170CFF
#> 2 #bfdff6 #1B7BC0FF
tibble(color = x) %>%
rowwise() %>%
mutate(darker = clr_darken(color))
#> # A tibble: 2 x 2
#> # Rowwise:
#> color darker
#> <chr> <colors>
#> 1 #fbbcb8 #CE170CFF
#> 2 #bfdff6 #1B7BC0FF
Created on 2020-08-12 by the reprex package (v0.3.0)
from prismatic.
hello 👋
It appears I might have messed up somewhere when creating the vector class. As a temporary fix you should be able to unclass()
the result inside the mutate()
call 😄
library(prismatic)
library(dplyr)
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
x <- c("#fbbcb8", "#bfdff6")
clr_darken(x)
#> <colors>
#> #CE170CFF #1B7BC0FF
colours <- tibble(color = x) %>%
mutate(darker = unclass(clr_darken(color)))
colours
#> # A tibble: 2 x 2
#> color darker
#> <chr> <chr>
#> 1 #fbbcb8 #CE170CFF
#> 2 #bfdff6 #1B7BC0FF
Created on 2020-07-14 by the reprex package (v0.3.0)
from prismatic.
thank you, i'll do that for now! 🎨
from prismatic.
thank you!
from prismatic.
Related Issues (20)
- Release prismatic 0.1.0
- Update colour manipulation to take advantage of changes in farver HOT 1
- Feature request: Add labels to plot
- Feature request: Add alpha to hex
- refactor tests
- create all in one colorblindness checker
- Release prismatic 0.2.0
- Include text contrast function?
- Use hcl instead of hsl?
- Easy way to manipulate individual hcl axes? HOT 6
- Release prismatic 1.0.0
- update to work with oklab
- Upkeep for prismatic
- Release prismatic 1.1.0
- Print color dataframes HOT 4
- Release prismatic 1.1.1
- switch from now superseeded crayon to cli HOT 1
- Release prismatic 1.1.2
- Provide contrast ratio function HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from prismatic.