Skip to content

Instantly share code, notes, and snippets.

@cormullion
Last active August 14, 2023 17:32
Show Gist options
  • Save cormullion/8344a628032dace020889b2d07aaced3 to your computer and use it in GitHub Desktop.
Save cormullion/8344a628032dace020889b2d07aaced3 to your computer and use it in GitHub Desktop.
using Luxor, Colors
function draw_logo(color=colorant"black")
box(O, 580, 500, 40, :clip)
mountain = [
Point(-300, 250),
Point(-300, 200),
Point(-64, -70),
Point(40, 40),
Point(105, -5),
Point(300, 200),
Point(300, 250),
]
sethue(color)
polysmooth(mountain, 25, :fill)
setline(80)
box(O, 580, 500, 60, :path)
strokepath()
@layer begin
translate(120, -80)
juliacircles(66)
end
clipreset()
end
# for a white background
Drawing(600, 520, "/tmp/images_logo_light_mode.svg")
origin()
draw_logo("black")
finish()
preview()
# for a dark background
Drawing(600, 520, "/tmp/images_logo_dark_mode.svg")
origin()
draw_logo("white") # for DarkMode
finish()
preview()
@cormullion
Copy link
Author

light mode (for light background)

images_logo_light_mode

dark mode (for dark background)

images_logo_dark_mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment