Closed maelle closed 6 years ago
Even without a budget we could contribute to the wall of stickers at useR! 2018: https://twitter.com/useR2018_conf/status/999443177412030464
@dicook do you know if there's a deadline for this?
Just as soon as possible so we can get the banner printed in time for useR! 2018.
On May 27, 2018, at 6:48 PM, Heather Turner notifications@github.com wrote:
Even without a budget we could contribute to the wall of stickers at useR! 2018: https://twitter.com/useR2018_conf/status/999443177412030464
@dicook do you know if there's a deadline for this?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Di Cook visnut@gmail.com
# make hex sticker
library("magrittr")
logo_path <- "https://github.com/forwards/website_source/raw/master/static/images/forwards.png"
# first step, hex sticker with wrong border
hexSticker::sticker(logo_path, package="",
filename="temp.png",
h_fill = "white",
h_color = "green",
s_width = 0.7,
s_height = 0.7,
h_size = 2,
s_x = 1, s_y = 1)
# now make border transparent
height <- magick::image_info(magick::image_read("temp.png"))$height
width <- magick::image_info(magick::image_read("temp.png"))$width
img <- magick::image_blank(width, height, "white") %>%
magick::image_composite(magick::image_read("temp.png")) %>%
magick::image_transparent(color = "#00FF00", fuzz = 1)
# blank gradient image for the background
fig <- magick::image_graph(width = width, height = height, res = 96)
x <- y <- seq(0,1,length.out=100)
tmp <- expand.grid(x=x,y=y)
z <- matrix( tmp$y , 100 )
par(mar=rep(0, 4), xpd = NA)
image(x, y, z, col = viridis::viridis_pal(option = "magma")(100),
axes = FALSE, xlab = "", ylab = "")
dev.off()
magick::image_composite(fig, img) %>%
magick::image_transparent("white") %>%
magick::image_write("forwards_hex.png")
Where should this piece of code live @hturner?
Edited (and code updated) to make background transparent:
And with a dark border as suggested by @hturner
hexSticker::sticker(logo_path, package="",
filename="forwards_hex2.png",
h_fill = "white",
h_color = viridis::viridis_pal(option = "magma")(100)[1],
s_width = 0.7,
s_height = 0.7,
h_size = 2,
s_x = 1, s_y = 1)
magick::image_read("forwards_hex2.png")%>%
magick::image_transparent("white") %>%
magick::image_write("forwards_hex2.png")
I vote for the gradient border that I find prettier.
You're right the gradient border is prettier. Will the transparent background cause issues for printing I wonder?
code should live in new forwards/branding repo, thanks
Maybe there should be one with white bg for printing 🤔
I'll send the hex to useR! committee tomorrow if no one comes forward (😂) with feedback before then 😇
Can this issue be closed now?
Yep
Print and give out at conferences? Would need a budget.
R-Ladies step by step https://github.com/rladies/starter-kit/tree/master/stickers