The reason the ANSI methods work but the X11 ones don't is that the refinement works by defining Presenter's instance methods onto String. While the ANSI methods are explicitly defined on Presenter, the X11 ones are handled by Presenter's method_missing, so they don't get added. I'll make a PR.
Version
Ruby: 3.2.2 Rainbow gem: 3.1.1 or Rainbow commit: 629cde5
Description
Using the String refinement interface, ANSI foreground color methods can be used but their X11 counterparts cannot.
Workarounds
Diagnosis
The reason the ANSI methods work but the X11 ones don't is that the refinement works by defining Presenter's instance methods onto String. While the ANSI methods are explicitly defined on Presenter, the X11 ones are handled by Presenter's method_missing, so they don't get added. I'll make a PR.