Skip to content

The background color does not affect the background numbering of lines of code #1

@mowshon

Description

@mowshon

First of all, I want to thank you for a wonderful module! This was what I was looking for and almost began to use Selenium for this.

I want the background of the line numbering to match the background of all the code. But apparently in the code I did not find where to specify the background color for the lines.

from code2image.cls import Code2ImageBackground

c2i = Code2ImageBackground(code_bg='#243036', img_bg='#5b81e3', line_numbers=True, shadow_dt=1)

with open('coding/requests-status-code/code.py') as f:
    code = f.read()

img = c2i.highlight(code)

# save the image
img.show()

Result:
bg

Also, the rectangle border radius is hardcoded and I can't change it from Code2Image attributes?

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