Skip to content

Instantly share code, notes, and snippets.

@n1ghtmare
Last active November 22, 2022 19:29
Show Gist options
  • Select an option

  • Save n1ghtmare/8829745e6788cc158b73aa327bb26bb9 to your computer and use it in GitHub Desktop.

Select an option

Save n1ghtmare/8829745e6788cc158b73aa327bb26bb9 to your computer and use it in GitHub Desktop.

Revisions

  1. n1ghtmare revised this gist Nov 22, 2022. 3 changed files with 0 additions and 0 deletions.
    File renamed without changes.
    File renamed without changes.
    File renamed without changes.
  2. n1ghtmare created this gist Nov 22, 2022.
    35 changes: 35 additions & 0 deletions after.lua
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,35 @@
    local Color, colors, Group, groups, styles = require('colorbuddy').setup()

    local M = {}

    function M.setup(opts)
    opts = opts or {}

    if opts.primary then
    Color.new('primary', opts.primary)
    else
    Color.new('primary', '#ff0088')
    end

    if opts.secondary then
    Color.new('secondary', opts.secondary)
    else
    Color.new('secondary', '#56c5cc')
    end

    -- I want to add another option for background and move the line below
    if opts.background then
    Colors.new('background', opts.background)
    else
    Colors.new('background', '#121212')
    end


    Color.new('grey', '#a7a7a7')


    -- Generic Highlighting
    Group.new('Normal', colors.background, colors.secondary) -- from colors.black to -> colors.background
    end

    return M
    30 changes: 30 additions & 0 deletions before.lua
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    local Color, colors, Group, groups, styles = require('colorbuddy').setup()

    local M = {}

    function M.setup(opts)
    opts = opts or {}

    if opts.primary then
    Color.new('primary', opts.primary)
    else
    Color.new('primary', '#ff0088')
    end

    if opts.secondary then
    Color.new('secondary', opts.secondary)
    else
    Color.new('secondary', '#56c5cc')
    end

    Color.new('black', '#121212')
    Color.new('grey', '#a7a7a7')


    -- Generic Highlighting
    Group.new('Normal', colors.black, colors.primary)
    -- Also works with
    --Group.new('Normal', colors.black, colors.seconary)
    end

    return M
    4 changes: 4 additions & 0 deletions usage.lua
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    requrie("my-theme").setup({ primary="#123456", seconary="#777777"})

    -- and with the new changes
    requrie("my-theme").setup({ primary="#123456", seconary="#777777", background="#000000"})