Open floating window with terminal colors

Hi everyone! I am having a little problem on trying to create a floating window with a coloured terminal output. Basically what I need is to have the same output as calling vim.api.termopen but without the [Process exited 0] message at the end.

What I am trying right now:

local opts = {...} -- some win options
local buf = vim.api.nvim_create_buf(false, true)
vim.api.nvim_open_win(buf, true, opts)

-- set local options
local term_id = api.nvim_open_term(buf, {})
local function send_output(_, data, _ )
    for _, d in ipairs(data) do 
        vim.api.nvim_chan_send(term_id, data .. "\n")
    end
end
vim.fn.jobstart("command that produces a colored output", {on_stdout = send_output})

I can see the output here, but with no colors and the linebreaks are also weird. Do you guys know a better way to make this?