Skip to content

Allow hex color for seekbarfg_color with osc_color_convert() #50

@Samillion

Description

@Samillion

Function from mpv's osc.lua
https://github.com/mpv-player/mpv/blob/master/player/lua/osc.lua#L104-L106

So that in modernx.conf it would allow hex:

seekbarfg_color="be4d25"

Usage in modernx.lua:

local function osc_color_convert(color)
    return color:sub(6,7) .. color:sub(4,5) ..  color:sub(2,3)
end

In local osc_styles = {, use the function:

SeekbarFg = "{\\blur1\\bord1\\1c&H" .. osc_color_convert(user_opts.seekbarfg_color) .. "&}",

The function should be used in all user_opts color options, then adjusting the default values to hex.

Side note:
Excellent fork, thank you for all the work. Just discovered it yesterday and I'm enjoying it very much.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions