Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AddBorders with rgba color value #380

Open
seiya-git opened this issue Jan 1, 2024 · 1 comment
Open

AddBorders with rgba color value #380

seiya-git opened this issue Jan 1, 2024 · 1 comment

Comments

@seiya-git
Copy link

Hello. AddBorders accept only rgb value or rgba accepted too?

https://avisynthplus.readthedocs.io/en/latest/avisynthdoc/corefilters/addborders.html
there is only color but no colors value

@qyot27
Copy link
Member

qyot27 commented Jan 1, 2024

Yes, RGBA is accepted too, at least if you use four-byte hex values instead of the three that colors_rgb.avsi defines for the color presets.

$48D1CC is medium turquoise, standard RGB
$0048D1CC is medium turquoise, RGBA with the alpha channel invisible (in ffplay or mpv, this will appear black or as the checkerboard transparency placeholder)
$FF48D1CC is medium turquoise, RGBA with the alpha channel visible ()

left=ColorBars(pixel_type="RGBP").AddAlphaPlane().Crop(0,0,-320,0).AddBorders(0,32,0,32,color=$0048D1CC)
right=ColorBars(pixel_type="RGBP").AddAlphaPlane().Crop(320,0,0,0).AddBorders(0,32,0,32,color=$FF48D1CC)
StackHorizontal(left,right)

(Note: I have not tested this on a big endian system to verify whether the hex value is interpreted the same way, or if I have tested it, I forgot whether it understands it as the same color or whether you have to use byte-swapped values)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants